using System.ComponentModel;

namespace Tequila.AugmentedReality.Data
{
    public class CameraPoi : INotifyPropertyChanged
    {
        private readonly PropertyChangedEventArgs _xPCEA = new PropertyChangedEventArgs("X");
        private readonly PropertyChangedEventArgs _yPCAE = new PropertyChangedEventArgs("Y");
        private readonly PropertyChangedEventArgs _zindexPCEA = new PropertyChangedEventArgs("ZIndex");
        private readonly PropertyChangedEventArgs _scalePCAE = new PropertyChangedEventArgs("Scale");
        private readonly PropertyChangedEventArgs _isVisiblePCAE = new PropertyChangedEventArgs("IsVisible");

        public CameraPoi(object data)
        {
            _data = data;
            _scale = 1;
        }

        private double _scale;
        public double Scale
        {
            get { return _scale; }
            set
            {                
                _scale = value;
                PropertyChanged(this, _scalePCAE);
            }
        }

        private bool _isVisible;
        public bool IsVisible
        {
            get { return _isVisible; }
            set
            {
                if (_isVisible != value)
                {
                    _isVisible = value;
                    PropertyChanged(this, _isVisiblePCAE);
                }
            }
        }

        private double _x;
        public double X
        {
            get { return _x; }
            set
            {
                _x = value;
                PropertyChanged(this, _xPCEA);
            }
        }

        private double _y;
        public double Y
        {
            get { return _y; }
            set
            {
                _y = value;
                PropertyChanged(this, _yPCAE);
            }
        }

        private object _data;
        public object Data
        {
            get { return _data; }            
        }

        private int _zIndex;
        public int ZIndex
        {
            get { return _zIndex; }
            set
            {
                if (value != _zIndex)
                {
                    _zIndex = value;
                    PropertyChanged(this, _zindexPCEA);
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged = delegate { };

    }
}